package com.adou.d15;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class StreamTest2 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("10001");
        list.add("10002");
        list.add("10003");
        list.add("10004");
        list.add("10005");

        List<String> list2 = new ArrayList<>();
        list2.add("10002");
        list2.add("10003");

        list = list.stream()
                .filter(t -> !list2.contains(t))
                .collect(Collectors.toList());
        list.forEach(t -> System.out.println(t));

        System.out.println("////////////");

        for (String s : list) {
            System.out.println(s);
        }

    }
}
